#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
    int N;
    cin >> N;
    int yang[10][10];
    for(int line = 0; line < N; line ++)
    {
        for(int i = 0; i< N -1 - line; i++)
          cout<<" ";
        for(int col = 0; col <= line; col++)
        {
            if((col == 0) ||(col == line))
                yang[line][col] = 1;
            else
                yang[line][col] = yang[line-1][col-1] + yang[line-1][col];
            cout << setw(4) << yang[line][col];
        }
        cout << endl;
    }
}